package plug_in_javafx_dt.launching;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.ClasspathContainerInitializer;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;

public class JFXClasspathContainerInitializer extends ClasspathContainerInitializer {
	
	@Override
	public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
		
		JFXClasspathContainer container = new JFXClasspathContainer( containerPath, project );
	   // if(container.isValid()) {
	        JavaCore.setClasspathContainer(containerPath, new IJavaProject[] {project},
	        new IClasspathContainer[] {container}, null);             
	  //  } else {
	       // Logger.log(Logger.WARNING, Messages.InvalidContainer + containerPath);
	    	System.out.println("!!!!!WARNING!! : containerPath");
	   // }
		
	}

}
